<%-- 
    Document   : AddUser
    Created on : Oct 18, 2011, 10:47:38 PM
    Author     : Tunp
--%>

<%@ include file="/WEB-INF/jsp/include.jsp" %> 
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>New user</title>
    <script language="javascript" type="text/javascript">
            function isNumeric(evt) {
                
            }
        </script>
    </head>
    <body>
        <h1>New User:</h1>
        <form:form method="POST" commandName="user" >
            <table>
            
            <tr>
                <td>
                    <b>Username:</b>
                </td>
                <td>
                <form:input path="username" id="userName" maxlength="100" />
                </td>
            </tr>
            <tr>
                <td>
                    <b>Password:</b>
                </td>
                <td>
            <form:input path="password" id="passWord"  maxlength="32" onkeypress=""/>
                </td>
            </tr>
            <tr>
                <td>
                    <b>Full name:</b>
                </td>
                <td>
            <form:input path="name" id="Name" maxlength="100" onkeypress="" />
                </td>
            </tr>
            <tr>
                <td>
                    <b>Gender:</b>
                </td>
                <td>
                    <form:radiobutton path="gender" id="genDer" value="M" label="Male" checked="checked" />
                    <form:radiobutton path="gender" id="genDer" value="F" label="Female" />
                </td>
            </tr>
            <tr>
                <td>
                    <b>Tel:</b>
                </td>
                <td>
            <form:input path="tel" id="Tel" maxlength="20" onkeypress="" />
                </td>
            </tr>
            <tr>
                <td>
                    <b>Email:</b>
                </td>
                <td>
            <form:input path="email" id="Email" maxlength="100" onkeypress="" />
                </td>
            </tr>
            <tr>
                <td>
                    <b>Address</b>
                </td>
                <td>
            <form:input path="address" id="Address" maxlength="100" onkeypress="" />
                </td>
            </tr>
            <tr>
                <td>
                    <b>Merchant:</b>
                </td>
                <td>
                    <select name="DvcntId">
                        <c:forEach var="dvcnt" items="${lstDvcnt}" >
                            <option value="<c:out value="${dvcnt.merchantId}"></c:out>">
                                <c:out value="${dvcnt.merchantName}"></c:out>
                            </option>
                        </c:forEach>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    <b>Role:</b>
                </td>
                <td>
                    <select name="UserroleId">
                        <c:forEach var="role" items="${lstUserrole}" >
                            <option value="<c:out value="${role.roleId}"></c:out>">
                                <c:out value="${role.roleName}"></c:out>
                            </option>
                        </c:forEach>
                    </select>
                </td>
            </tr>
            <tr>
                <td colspan="2"><input type="submit" value="OK"></input></td>
            </tr>
            <tr>
                <td colspan="2">
                    <a href="userlist.htm"><b> Back to list users </b> </a>
                </td>
            </tr>
            </table>
        </form:form>
    </body>
</html>
